<?php
/* @var $this ProductCategoryController */
/* @var $model ProductCategory */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'product-category-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
    	'enctype' => 'multipart/form-data'
     )
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'parent_id'); ?>
		<?php echo $form->dropDownList($model, 'parent_id', CHtml::listData($model->findAllByAttributes(array('status' => 1)), 'id', 'title') , array('empty' => array('0' => ' - '))); ?>
		<?php echo $form->error($model,'parent_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'thumbnail'); ?>
		<?php echo $form->fileField($model,'thumbnail',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'thumbnail'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status', array(0 => Yii::t('app', 'unPublic'), 1 => Yii::t('app', 'public'))); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'show_menu'); ?>
		<?php echo $form->dropDownList($model,'show_menu', array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes'))); ?>
		<?php echo $form->error($model,'show_menu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sorter'); ?>
		<?php echo $form->textField($model,'sorter'); ?>
		<?php echo $form->error($model,'sorter'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'seo_link'); ?>
		<?php echo $form->textField($model,'seo_link',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'seo_link'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'seo_keyword'); ?>
		<?php echo $form->textArea($model,'seo_keyword',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'seo_keyword'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'seo_description'); ?>
		<?php echo $form->textArea($model,'seo_description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'seo_description'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<!-- 	<div class="row"> -->
		<?php //echo $form->labelEx($model,'desc'); ?>
		<?php //echo $form->textArea($model,'desc',array('rows'=>6, 'cols'=>50)); ?>
		<?php //echo $form->error($model,'desc'); ?>
<!-- 	</div> -->
<!-- 	<div class="row"> -->
		<?php //echo $form->labelEx($model,'header'); ?>
		<?php //echo $form->textArea($model,'header',array('rows'=>6, 'cols'=>50)); ?>
		<?php //echo $form->error($model,'header'); ?>
<!-- 	</div> -->
<!-- 	<div class="row"> -->
		<?php //echo $form->labelEx($model,'footer'); ?>
		<?php //echo $form->textArea($model,'footer',array('rows'=>6, 'cols'=>50)); ?>
		<?php //echo $form->error($model,'footer'); ?>
<!-- 	</div> -->